const _ = require('underscore');
const { throttle } = _

function a() {
    return new Promise(r => {
        setTimeout(r, 1000)
    })
}

async function b() {
    await a()
    console.log(1234)
    return 123
}

const c = throttle(b, 10000, { leading: true, trailing: false })
async function d() {
    for (let v = 0; v < 10; v++) {
        const x = await c()
        console.log(x)
    }
}
d()